<extend name="Public/base" />

<block name="body">
    <div class="main-title" style="padding-bottom: 10px;" >
        <h2>扬州鲜生活电子退换处理</h2>
    </div>
    <div class="row" ng-controller="RejectCtrl" >
        <div class="data-table table-striped" ng-init='init({$product})'>
            <div class="printpage " style=' margin: 0 15px;' >
                <div class="row" style=" background: #353535;color: #fff; height: 30px;line-height: 30px;text-align: left;">
                    <div class="col-xs-5"> 退单详情——商品清单</div>
                </div>
                <br>
                <div class="row">
                    <div class="col-xs-12">
                        <table width="100%" border="0" class="table table-bordered">
                            <tr >
                                <td ></td>
                                <td scope="col"  width="">商户</td>
                                <td scope="col"  width="">商品名称(规格)</td>
                                <td scope="col">数量</td>
                                <td scope="col">备注</td>
                            </tr>
                            <volist name="_list" id="vs">
                                <tr>
                                    <td>
                                        [{$i}]
                                    </td>
                                    <td >
                                    <b>{$vs.buyer}</b>
                                </td>
                                    <td>
                                        <b>{$vs.pname}({$vs.spec})</b>
                                    </td>
                                    <td>
                                        <b>{$vs.num}</b>
                                    </td>
                                    <td>
                                        <b>{$vs.reason}</b>
                                    </td>
                                </tr>
                            </volist>
                        </table>

                    </div>
                </div>
            </div>
        </div>
        <form action="{:U('dealreject')}" method="post"  class="form-horizontal">
            <div class="panel panel-default">
                <div class="data-table table-striped">
                    <table>
                        <thead>
                            <tr>
                                <th><input type="hidden" name="id" value="{$_list[0]['id']}"></th>
                                <th>操作</th>
                                <th>商品名</th>
                                <th>规格</th>
                                <th>数量</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>
                                    <input type="hidden" name="action[]" value="zzz">
                                </td>
                                <td>转榨汁</td>
                                <td>
                                    {$pname}
                                    <input type="hidden" name="pname[]" value="{$pname}">
                                    <input type="hidden" name="buyer[]" value="{$buyer}">
                                </td>
                                <td>
                                    <select name="spec[]" style="height: 30px; width:100px;">
                                        <option value="斤">斤</option>
                                        <option value="个">个</option>
                                    </select>
                                </td>
                                <td>
                                    <input type="text" name="num[]">
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <input type="hidden" name="action[]" value="rk">
                                </td>
                                <td>入库</td>
                                <td>
                                    {$pname}
                                    <input type="hidden" name="pname[]" value="{$pname}">
                                    <input type="hidden" name="buyer[]" value="{$buyer}">
                                </td>
                                <td>
                                    <select select2 style="height: 30px; width:100px;" name="spec[]">
                                        <option value="">请选择...</option>
                                        <option ng-repeat="p in product" >{{p.spec}}</option>
                                    </select>
                                </td>
                                <td>
                                    <input type="text" name="num[]">
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <input type="hidden" name="action[]" value="bs">
                                </td>
                                <td>报损</td>
                                <td>
                                    {$pname}
                                    <input type="hidden" name="pname[]" value="{$pname}">
                                    <input type="hidden" name="buyer[]" value="{$buyer}">
                                </td>
                                <td>
                                    <select name="spec[]" style="height: 30px; width:100px;">
                                        <option value="斤">斤</option>
                                        <option value="个">个</option>
                                    </select>
                                </td>
                                <td>
                                    <input type="text" name="num[]">
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="col-md-12 " >
                    <button type="submit" class="btn  btn-danger" style="">保 存</button>
                    <a  class="btn btn-success" id="fh" onclick="javascript:history.back(-1); return false;">返 回</a>
            </div>
        </form>
    </div>

</block>

<block name="script">
    <script type="text/javascript">
        highlight_subnav('{:U('reject/rejectlist')}');
    </script>
</block>
